﻿using MyServer.Todo.Domain;
using MyServer.Todo.Domain.Aggregates.TodoGroupAggregate;

namespace MyServer.Todo.Infrastructure.Repositories
{
    public class TodoGroupRepository :Repository<TodoGroup>,ITodoGroupRepository
    {
        public TodoGroupRepository(TodoDbContext dbContext):base(dbContext)
        {

        }

        public IUnitOfWork UnitOfWork => _dbContext;

        public override TodoGroup Get(string id)
        {
            return _dbContext.TodoGroups.FirstOrDefault(_ => _.Id == id);
        }
    }
}
